package com.atguigu.responsibilitychain;

import java.math.BigDecimal;

public class Client {
    public static void main(String[] args) {
        PurchaseRequest purchaseRequest = new PurchaseRequest(1, 1, new BigDecimal("-9000"));

        DepartmentOperator departmentOperator = new DepartmentOperator("张主任");
        CollegeOperator collegeOperator = new CollegeOperator("李院长");
        ViceSchoolMasterOperator viceSchoolMasterOperator = new ViceSchoolMasterOperator("王副校长");
        SchoolMasterOperator schoolMasterOperator = new SchoolMasterOperator("习校长");

        departmentOperator.setOperator(collegeOperator);
        collegeOperator.setOperator(viceSchoolMasterOperator);
        viceSchoolMasterOperator.setOperator(schoolMasterOperator);

        departmentOperator.processRequest(purchaseRequest);

    }
}
